package com.designpattern.decorativePattern;

/**
 * @author Liusr
 * @date 2023/2/27
 * @package com.designpattern.decorativePattern
 * @Description: Decorator类
 */
public class Finery extends Person{

	//设置component
	protected Person component;

	public void decorate(Person person) {
		this.component = person;
	}

	//重写Operation()，实际执行的是component的Operation()
	public void show() {
		if (component != null) {
			component.show();
		}
	}
}
